<!DOCTYPE html>
<script src="full-screen-test.js"></script>
<script>
    function runTest() {
        document.offsetWidth;
        frame.contentDocument.offsetWidth;
        var videoEnteredFullScreen = function() {
            test("getComputedStyle(document.documentElement).overflow == 'hidden'");
            endTest();
        };
        waitForEvent(frame.contentDocument, "webkitfullscreenchange", videoEnteredFullScreen);

        test("getComputedStyle(document.documentElement).overflow == 'visible'");

        var x = frame.getBoundingClientRect().left + 10;
        var y = frame.getBoundingClientRect().top + 10;
        eventSender.mouseMoveTo(x, y);
        eventSender.mouseDown();
        eventSender.mouseUp();
    }
</script>
<div id="ancestor" style="position:relative">
  <iframe allowfullscreen id="frame" src="resources/inner-video.html" onload="runTest()"></iframe>
</div>
